package yagoPolitician;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class CreateIndex {
	public static void main(String[]args) throws ClassNotFoundException, SQLException{
		Class.forName("org.postgresql.Driver");
		Connection db = DriverManager.getConnection("jdbc:postgresql:yago2spotlx_db", "lyao1", "");
		if( db==null){
			System.out.println("null");
		}else{
			System.out.println("not null");
		}
		Statement st = db.createStatement();
		System.out.println("start creating");
		st.executeQuery("CREATE INDEX relationalfacts_relation ON relationalfacts(relation,timebegin);");
		System.out.println("create finished");
		st.close();
	}
}
